﻿using System;
using System.Linq;
using Anmlz.Model.Entities;
using Anmlz.Model.Model;
using Anmlz.Services;

namespace Anmlz.Data.ModelFactory
{
    public partial class ModelFactory
    {
        public ImageModel Create(Image entity)
        {
            return new ImageModel()
            {
                Id = entity.Id,
                Url = entity.Name
            };
        }

        public Image Parse(ImageModel model)
        {
            return new Image()
            {
                Name = model.Name
            };
        }
    }
}